import { request } from "@/request";

// 登录
export async function fetchSingIn(body, options) {
  return request("/api/admin/login", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
// 退出登录
export async function fetchSingUp(options) {
  return request("/api/admin/logout", {
    method: "POST",
    ...(options || {}),
  });
}

// 上传图片
export function uploadImage(data) {
  return request(`/file/upload`, {
    method: "post",
    data,
  });
}


